<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Home</title>
<style type="text/css">
<!--
a:link {
	text-decoration: none;
	color: #FFFF99
}

a:visited {
	text-decoration: none;
	color: #FFFF99
}

a:hover {
	color: skyblue
}
-->
</style>
</head>
<body background="images/gradient.png" bgproperties="fixed">
	<!-- <h1>HOME</h1> -->
	<div align="center">
		<img src="images/header.png">
	</div>
	<div align="center">
		<table width="1000" bgcolor="#4956B1">
			<tr>
				<%
					if (session.getAttribute("username") == null) {
				%>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="home.jsp">&nbsp;&nbsp;HOME&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="register.jsp">&nbsp;&nbsp;REGISTRAZIONE&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="search.jsp">&nbsp;&nbsp;RICERCA&nbsp;&nbsp;</a></b></font></td>
				<td></td>
				<%
					} else {
				%>
				<%
					if (session.getAttribute("admin") == null) {
				%>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="home.jsp">&nbsp;&nbsp;HOME&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="./MyProfile">&nbsp;&nbsp;PROFILO&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="./Friends">&nbsp;&nbsp;AMICI&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="./FriendshipReqs">&nbsp;&nbsp;AMICIZIE&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="./HelpReqs">&nbsp;&nbsp;AIUTI&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="./SkillReqs">&nbsp;&nbsp;ABILITA'&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="search.jsp">&nbsp;&nbsp;RICERCA&nbsp;&nbsp;</a></b></font></td>
				<td></td>
				<td align="right" valign="middle" width="150" height=""><font
					face="tahoma" color="#FFFF99" size="2">&nbsp;&nbsp;Ciao, <%=session.getAttribute("username")%>!
						<a href="./Logout"><b>LOGOUT&nbsp;&nbsp;</b></a></font></td>
				<%
					} else {
				%>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="home.jsp">&nbsp;&nbsp;HOME&nbsp;&nbsp;</a></b></font></td>
				<td align="center" valign="middle" width="50" height=""><font
					face="tahoma" color="#FFFF99" size="2"><b><a
							href="./SkillReqs">&nbsp;&nbsp;ABILITA'&nbsp;&nbsp;</a></b></font></td>
				<td></td>
				<td align="right" valign="middle" width="200" height=""><font
					face="tahoma" color="#FFFF99" size="2">&nbsp;&nbsp;Benvenuto,
						<%=session.getAttribute("username")%>! <a href="./Logout"><b>LOGOUT&nbsp;&nbsp;</b></a>
				</font></td>
				<%
					}
				%>
				<%
					}
				%>
			</tr>
		</table>
	</div>
	<div align="center">
		<table width="1000" bgcolor="#FFFFFF">
			<tr>
				<td>
					<%
						if (session.getAttribute("username") == null) {
					%> <br> <font face="tahoma" size="5"><b>Benvenuto
							in SWIMv2!</b></font> <br> <br> <font face="tahoma" size="4">SWIMv2
						ti aiuta a connetterti e rimanere in contatto con chi può darti
						una mano. </font><br>
				<font face="tahoma" size="4">Per poter utilizzare tutte le
						funzionalità, registrati al sito! </font><br> <br> <br> <br>
					<br> <%
 	} else {
 %> <%
 	if (session.getAttribute("admin") == null) {
 %> <br> <font face="tahoma" size="5"><b>Ciao, <%=session.getAttribute("username")%>!
					</b></font> <br> <br> <font face="tahoma" size="4">Questa è
						la sezione riservata agli utenti registrati.</font><br> <br> <br>
					<br> <br> <%
 	} else {
 %> <br> <font face="tahoma" size="5"><b>Benvenuto, <%=session.getAttribute("username")%>!
					</b></font> <br> <br> <font face="tahoma" size="4">Questa è
						la sezione riservata all'amministratore.</font><br> <br> <br>
					<br> <br> <%
 	}
 %> <%
 	}
 %>
				</td>
				<%
					if (session.getAttribute("username") == null) {
				%>
				<td align="center" valign="top" width="250" bgcolor="E3E8F2">
					<form method="post" action="./Login">
						<table>
							<tr>
								<td align="right"><font face="tahoma" size="2">Username</font></td>
								<td><input type="text" name="username"></td>
							</tr>
							<tr>
								<td align="right"><font face="tahoma" size="2">Password</font></td>
								<td><input type="password" name="password"></td>
							</tr>
							<tr>
								<td></td>
								<td><input type="submit" value="Accedi"></td>
							</tr>
						</table>
					</form>
				</td>
				<%
					} else {
				%>
				<td valign="top" width="250" bgcolor="E3E8F2"></td>
				<%
					}
				%>
			</tr>
		</table>
	</div>
	<div align="center">
		<table width="1000" bgcolor="#4956B1">
			<tr>
				<td align="center" valign="middle" height=""><font
					face="tahoma" size="2" color="#FFFF99">Copyright © 2012-2013
						&nbsp;&nbsp; Eric De Marco - Giulia Busnelli &nbsp; Tutti i
						diritti riservati</font></td>
			</tr>
		</table>
	</div>
</body>
</html>